package com.woniu.mealsService.service;

import com.woniu.dto.CommentDto;
import com.woniu.mealsService.model.Comment;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.param.AddCommentParam;
import com.woniu.param.replyCommentParam;
import com.woniu.utils.PageInfo;

import java.util.List;

/**
 * <p>
 * 评价表 服务类
 * </p>
 *
 * @author jiang
 * @since 2024年12月09日
 */
public interface CommentService extends IService<Comment> {

    String addComment(AddCommentParam bean,String userId) throws Exception;

    boolean deleteComment(String orderId, String userId) throws Exception;

    String replyComment(replyCommentParam bean, String userId) throws Exception;

    List<CommentDto> getComment(String userId) throws Exception;
    // 计算店铺评分
    Integer calculateStoreScore(List<String> orderIds) throws Exception;

    List<CommentDto> getCommentByStoreId(String storeId);

    PageInfo<CommentDto> getPageComment(String userId, Integer pageNum, Integer pageSize) throws Exception;

    PageInfo<CommentDto> getReplyComment(String userId, Integer pageNum, Integer pageSize) throws Exception;
}
